compressor.py

Base class for Compressors used by the framework

class bashfuscator.core.mutators.compressor.Compressor(name, description, sizeRating, timeRating, binariesUsed=[], fileWrite=False, notes=None, author=None, credits=None, evalWrap=True, unreadableOutput=False)[source]

Bases: bashfuscator.core.mutators.mutator.Mutator

Base class for all compressors. A compressor is a Mutator that takes input, mutates it to make it smaller, and restores it to the original input with a decompression stub.

Parameters:
  • name (str) – name of the Compressor
  • description (str) – short description of what the Compressor does
  • sizeRating (int) – rating from 1 to 5 of how effectively the Compressor decreases the size of the overall payload. Smaller is better
  • timeRating (int) – rating from 1 to 5 of how much the Compressor increases the execution time of the overall payload
  • binariesUsed (list of strs) – list of all the binaries the Compressor uses
  • fileWrite (bool) – True if the Compressor requires creating/writing to files, False otherwise
  • notes (str) – see bashfuscator.common.objects.Mutator
  • author (str) – see bashfuscator.common.objects.Mutator
  • credits (str) – see bashfuscator.common.objects.Mutator